﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using S3System.ServiceContract.MessageContracts;

namespace S3System.ServiceImplementation
{
    public class S3SystemService :  ServiceContract.IS3SystemService
    {

        public BusinessLogic.CRM.IBCCustomerManagement BCCustomerManagement { get; set; }


        #region IS3SystemService Members

        public ServiceContract.MessageContracts.MaintenanceCustomerResponse MaintenenceCustomer(ServiceContract.MessageContracts.MaintenanceCustomerRequest request)
        {
            var response = new MaintenanceCustomerResponse();

            switch (request.Operation)
            {
                case  0:

                    var be = new BusinessEntities.Customer(); 
                    be.Id =  request.Customer.Id;  
                    be.FirstName = request.Customer.FirstName; 
                    be.LastName = request.Customer.FirstName;  
                    be.BirthDate = DateTime.Now;
                    BCCustomerManagement.MaintenanceCustomer(be);
                    break;
                default:
                    break;
            }
            return response; 

        }

        #endregion

       

    
    }
}
